instanceof
A instanceof B 判断A对象是不是B构造函数构造出来的

<script type="text/javascript">
	function Person(){}
	var person = new Person();
	console.log(person instanceof Person)
</script>

看A对象的原型链上有没有B的原型

<script type="text/javascript"> 
	var person;
	console.log([] instanceof Array);
	console.log(person instanceof Object);
	console.log(person instanceof Array);
	console.log({} instanceof Object);

	var obj = {};
	console.log(obj instanceof person);
</script>

区别数组和对象的三种方法
constructor,instanceof ,toString
<script type="text/javascript">
	console.log(Object.prototype.toString.call([]));
	console.log(Object.prototype.toString.call({}));
	console.log(Object.prototype.toString.call(123));
</script>

<script type="text/javascript">
	Object.prototype.toString = function(){
		//识别this
		//返回相应的结果
	}

	console.log([]);
	console.log({});

	var obj = {};
	console.log(obj.constructor);
	console.log([].constructor)
</script>